feat: Add mentee review api with approve/reject#598
Merged
dricazenck merged 6 commits intomainfrom Apr 6, 2026
Merged
Conversation
Introduce three new admin endpoints under MENTEE_APPROVE permission:
GET /mentees/applications/review returns enriched priority-1 PENDING
applications for admin review; PATCH /mentees/{id}/approve promotes the
priority-1 application to MENTOR_REVIEWING; PATCH /mentees/{id}/reject
rejects all PENDING applications for a mentee. Adds repository query
methods findByStatusAndPriorityOrder and findPendingByMenteeId backed by
new SQL queries, plus MenteeApplicationReviewDto combining application
and mentee profile data. Unit and integration tests included.
|
The latest updates on your projects. Learn more about Vercel for GitHub. 1 Skipped Deployment
|
goelsonali
reviewed
Apr 6, 2026
The enum used 4-space indentation with closing braces on their own lines, inconsistent with the rest of the codebase which follows Google Java Format (2-space indent, fields and methods at the same level as the enum body). This reformats the file to match the enforced style so it no longer diffs noisily against auto-formatted code. No functional change.
…into feat/admin-mentee-review-api
MenteeApplicationReviewDto was left over from an earlier design iteration and had no callers; removing it prevents confusion for future contributors. Also replace List.get(0)/get(1) with getFirst()/getLast() in the integration test to align with the Java 21 style used elsewhere in the codebase.
womencodingcommunity
approved these changes
Apr 6, 2026
Contributor
womencodingcommunity
left a comment
There was a problem hiding this comment.
Great work on this PR! The mentee review workflow is correctly implemented and the architecture is clean.
What stands out:
- Extracting admin operations into
MenteeAdminServiceis the right call — clean SRP with no production@SuppressWarningsneeded. activateMenteeandrejectMenteeboth use@Transactionaland do a pre-flightfindByIdcheck, giving a clear 404 instead of a silent no-op if the mentee is not found.- The cascade rejection of all pending applications when rejecting a mentee is exactly the right behaviour.
- Integration tests cover priority ordering, status-filtering edge cases, and empty states — solid coverage.
All review findings were addressed before merge: the unused MenteeApplicationReviewDto leftover was deleted and List.get(0)/get(1) was replaced with Java 21 getFirst()/getLast() in the integration test. ✅
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Summary
Related Issue
closes #434
Change Type
Screenshots
Pull request checklist
Please check if your PR fulfills the following requirements: